Skip to content

feat(devin): add subagents adapter (.devin/agents/{name}/AGENT.md) - #1902

Merged
dyoshikawa merged 1 commit into
mainfrom
resolve-scrap-issue-1891-devin-subagents
Jun 16, 2026
Merged

feat(devin): add subagents adapter (.devin/agents/{name}/AGENT.md)#1902
dyoshikawa merged 1 commit into
mainfrom
resolve-scrap-issue-1891-devin-subagents

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Implements the subagents part of #1891: a native Devin Local custom subagent adapter.

Devin Local discovers custom subagent profiles as AGENT.md files in a directory-per-agent layout, where the directory name is the profile id:

  • Project: .devin/agents/<name>/AGENT.md
  • Global: ~/.config/devin/agents/<name>/AGENT.md

The adapter maps the rulesync name/description to top-level frontmatter and packs the Devin-specific fields (model, allowed-tools, permissions with allow/deny/ask, max-nesting) into a devin: section, round-tripping on import.

Evidence (verified upstream doc): https://docs.devin.ai/cli/subagents

Changes

  • src/constants/devin-paths.ts: add DEVIN_AGENTS_DIR_PATH (.devin/agents) and DEVIN_GLOBAL_AGENTS_DIR_PATH (.config/devin/agents, resolved under the home root in global mode — note this is NOT .devin/agents/ under home).
  • src/features/subagents/devin-subagent.ts: new DevinSubagent adapter (modeled on factorydroid-subagent.ts + the directory-per-agent layout from deepagents-subagent.ts).
  • src/features/subagents/devin-subagent.test.ts: unit tests (paths, fromFile, fromRulesyncSubagent, toRulesyncSubagent, forDeletion, targeting, Devin-specific fields, global mode).
  • src/features/subagents/subagents-processor.ts: wire DevinSubagent into the factory map and tool-target tuple. The filePattern is */AGENT.md so the directory-per-agent layout is discovered (the flat agents root is not scanned).
  • src/features/subagents/subagents-processor.test.ts: add devin to the expected target lists.
  • src/cli/commands/gitignore-entries.ts + .gitignore: add **/.devin/agents/ (project; the global ~/.config/devin/agents/ lives under home and is not gitignored at the project level).
  • src/e2e/e2e-subagents.spec.ts: add Devin happy-path cases to the generate, orphan-deletion, import, and global-mode matrices.
  • README.md, docs/reference/supported-tools.md, docs/reference/file-formats.md (+ auto-synced skills/rulesync/): flip the Devin subagents cell to ✅ and document the format/frontmatter.

Notable deviations from the precedent

  • Directory-per-agent layout: output is .devin/agents/<name>/AGENT.md (not flat <name>.md). The subagent name is derived from the rulesync file name on generation and from the parent directory on import.
  • Different global root: global mode emits to ~/.config/devin/agents/ rather than .devin/agents/ under the home directory, so getSettablePaths({ global }) returns a distinct relative dir for global vs project.

Deferred: permissions

The permissions part of the issue is intentionally deferred, matching the issue's own gating ("Evaluate a devin-permissions.ts adapter once the persistent permissions config file/path is confirmed"). Devin documents only the runtime "Always Allow" grant UX, with no confirmed static on-disk permissions config file/path. Once an official persistent permissions file/path is documented, a devin-permissions.ts adapter can follow up. Closes #1891 is appropriate since the actionable scope (subagents) is delivered and the permissions piece is blocked on an unmet upstream precondition.

Verification

pnpm cicheck is fully green (code + content): 270 test files / 6467 tests passing, formatting/lint/typecheck clean, cspell and secretlint clean, skills/rulesync docs in sync.

Closes #1891

🤖 Generated with Claude Code

Devin Local custom subagent profiles are AGENT.md files in named directories:
project .devin/agents/<name>/AGENT.md and global ~/.config/devin/agents/<name>/AGENT.md.
The directory name is the profile id. Frontmatter maps name/description plus a
devin section (model, allowed-tools, permissions, max-nesting).

Closes #1891

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dyoshikawa
dyoshikawa merged commit 1f4a5f1 into main Jun 16, 2026
9 checks passed
@dyoshikawa

Copy link
Copy Markdown
Owner Author

@dyoshikawa Thank you!

@dyoshikawa
dyoshikawa deleted the resolve-scrap-issue-1891-devin-subagents branch June 16, 2026 13:29
@dyoshikawa dyoshikawa mentioned this pull request Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow up Devin Desktop upstream updates: AGENT.md subagents and tool permissions

2 participants